package com.bootcamp.javase;

/**
 * @program: OopCode
 * @description: student class
 * @author: Keyu Li
 * @create: 2021-08-27 19:37
 **/

public class StudentFour {
    String name;
    int age;
    String gender;
    int stuId;

    public StudentFour() {
    }

    public StudentFour(String name) {
        this.name = name;
    }

    public StudentFour(String name, int stuId) {
        this.name = name;
        this.stuId = stuId;
    }

    public StudentFour(String name, int age, String gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public StudentFour(String name, int age, String gender, int stuId) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.stuId = stuId;
    }

    public void print(){
        System.out.println("name: "+this.name+
                ", age: "+this.age+
                ", gender: "+this.gender+
                ", studentID: "+this.stuId);
    }
}

class TestObject{
    public static void main(String[] args) {
        StudentFour stu1 = new StudentFour("张三", 18, "男", 1);
        StudentFour stu2 = new StudentFour("李四", 25, "女", 2);
        stu1.print();
        stu2.print();
    }
}